var car = (function() {
    var start = 13;
    var total = 0;

    return {
        price: function(n) {
            if (n > 3) {
                total = start;
            } else {
                total = start + (n-3) * 5
            }
            return total;
        },
        yd: function(flag) {
            return flag ? total + 10 : total;
        }
    }
})()
var price = car.price(3)
console.log(price)